#include("/common/_body.html")

#define page_content()
<div class="row">
	<div class="col-xs-2">
		<ul id="tt"></ul>
	</div>
	<div class="col-xs-10">
		<div class="row">
			<div class="col-sm-12 search-collapse no-margin-top">
				<h4 class="blue bolder no-margin">
					资源管理
				</h4>
				<form class="form-horizontal" id="ff" method="post">
					<div class="form-group">
						<label class="col-sm-3 control-label">资源ID：</label>
						<div class="col-sm-4">
							<input class="easyui-textbox ftext" id="resource_id" name="resource.id" data-options="readonly:true">
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label">资源名称：</label>
						<div class="col-sm-4">
							<input class="easyui-textbox ftext" name="resource.res_name" data-options="required:true">
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label">上级节点：</label>
						<div class="col-sm-4">
							<input class="easyui-textbox ftext" id="res_pid" name="resource.res_pid">
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label">链接地址：</label>
						<div class="col-sm-4">
							<input class="easyui-textbox ftext" name="resource.res_url" data-options="required:true">
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label">图片：</label>
						<div class="col-sm-4">
							<input class="easyui-textbox ftext" name="resource.res_icon">
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label">资源标识：</label>
						<div class="col-sm-4">
							<input class="easyui-textbox ftext" name="resource.res_remark" data-options="required:true,prompt:'组合关键字形成权限标识'">
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label">菜单标识：</label>
						<div class="col-sm-4">
							<input class="easyui-textbox ftext" name="resource.menu_remark" data-options="prompt:'不填则与资源标识相同，用于回显选中菜单'">
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label">打开方式：</label>
						<div class="col-sm-4">
							<select class="easyui-combobox ftext" name="resource.res_target">
								#dic_for("resource_target")
				                <option value="#(item_code)">#(item_value)</option>
				             	#end
				             </select>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label">排序号：</label>
						<div class="col-sm-4">
							<input class="easyui-numberbox ftext" name="resource.res_order" value="#(resource.res_order??)">
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label">是否显示：</label>
						<div class="col-sm-4">
							#dic_for("resource_status")
							<label class="inline inline-radio">
								<input class="easyui-radiobutton" name="resource.status" 
				                #if(item_code.toInt() == 10) checked #end
				                value="#(item_code)">
				                <span class="lbl middle"> #(item_value)</span>
				            </label>
							#end
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label">权限关键字：</label>
						<div class="col-sm-9">
							<div class="well well-sm">
								<div class="row">
								#for(x : signs)
								<div class="col-xs-2">
									<label for="signbox_#(x.id)">
										<input id="signbox_#(x.id)" name="resource.auth_signs" value="#(x.sign_name)" class="easyui-checkbox">
										<span class="lbl"> #(x.sign_remark)</span>
									</label>
								</div>
								#end
								</div>
							</div>
						</div>
					</div>
					<div class="hr"></div>
					<div class="form-group no-margin-bottom">
						<div id="edit_div" class="col-md-offset-3 col-md-9">
							#auth_has("resource_update")
							<button class="btn btn-info btn-sm no-border" type="button" onclick="editM()">
								<i class="fa fa-edit"></i>
								修改 
							</button>
							#end
							&nbsp; &nbsp; &nbsp;
							#auth_has("resource_delete")
							<button class="btn btn-yellow btn-sm no-border" type="button" onclick="deleteM()">
								<i class="fa fa-remove"></i>
								删除
							</button>
							#end
							&nbsp; &nbsp; &nbsp;
							#auth_has("resource_save")
							<button class="btn btn-purple btn-sm no-border"  type="button" onclick="reloadM()">
								<i class="fa fa-plus"></i>
								重新添加
							</button>
							#end
						</div>
						<div id="add_div" class="col-md-offset-3 col-md-9">
							#auth_has("resource_save")
							<button class="btn btn-info btn-sm no-border"  type="button" onclick="addM()">
								<i class="fa fa-plus"></i>
								添加
							</button>
							#end
						</div>
					</div>
				</form>
	    	</div>
		</div>
	</div>
</div>
#end

#define js()
<script src="#(path)/js/templates/pdc/resource_list.js"></script>
#end